home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig09_10.jar
/
Ch09
/
Fig09_10
/
Cylindr2.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-11-09
|
653b
|
27 lines
// Fig. 9.10: cylindr2.h
// Definition of class Cylinder
#ifndef CYLINDR2_H
#define CYLINDR2_H
#include "circle2.h"
class Cylinder : public Circle {
friend ostream &operator<<( ostream &, const Cylinder & );
public:
// default constructor
Cylinder( double h = 0.0, double r = 0.0,
int x = 0, int y = 0 );
void setHeight( double ); // set height
double getHeight() const; // return height
double area() const; // calculate and return area
double volume() const; // calculate and return volume
protected:
double height; // height of the Cylinder
};
#endif